package com.dm.base.domain;

import com.dm.common.annotation.Excel;
import com.dm.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 数据库对象 b_db
 *
 * @author dm
 * @date 2024-12-09
 */
public class BDb extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 数据库iD
     */
    private Long dbId;

    /**
     * 连接名称
     */
    @Excel(name = "连接名称")
    private String name;

    /**
     * 地址
     */
    @Excel(name = "地址")
    private String url;

    /**
     * 端口
     */
    @Excel(name = "端口")
    private Integer port;

    /**
     * 库名
     */
    @Excel(name = "库名")
    private String dbName;

    /**
     * 登录名
     */
    @Excel(name = "登录名")
    private String loginName;

    /**
     * 登录密码
     */
    @Excel(name = "登录密码")
    private String loginPassword;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    public void setDbId(Long dbId) {
        this.dbId = dbId;
    }

    public Long getDbId() {
        return dbId;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUrl() {
        return url;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public Integer getPort() {
        return port;
    }

    public void setDbName(String dbName) {
        this.dbName = dbName;
    }

    public String getDbName() {
        return dbName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginPassword(String loginPassword) {
        this.loginPassword = loginPassword;
    }

    public String getLoginPassword() {
        return loginPassword;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("dbId", getDbId())
                .append("name", getName())
                .append("url", getUrl())
                .append("port", getPort())
                .append("dbName", getDbName())
                .append("loginName", getLoginName())
                .append("loginPassword", getLoginPassword())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
